﻿using BCEntity.CRM.BigCustomer;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.CRM.BigCustomer
{
    public interface IBigCustomerData
    {
        /// <summary>
        /// 删除大客户记录
        /// </summary>
        /// <param name="bigCustomerId"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(long bigCustomerId);
        /// <summary>
        /// 获取大客户记录
        /// </summary>
        /// <param name="bigCustomerId"></param>
        /// <returns></returns>
        Task<BigCustomerEntity> GetEntityAsync(long bigCustomerId);
        /// <summary>
        /// 获取大客户记录
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        Task<BigCustomerEntity> GetEntityByUserIdAsync(long userId);
        /// <summary>
        /// 查询大客户记录
        /// </summary>
        /// <param name="companyId"></param>
        /// <param name="userId"></param>
        /// <param name="bigCustomerGroupId"></param>
        /// <param name="bigCustomerLevel"></param>
        /// <param name="customerName"></param>
        /// <param name="provinceCode"></param>
        /// <param name="cityCode"></param>
        /// <param name="countyCode"></param>
        /// <param name="phone"></param>
        /// <param name="weChatNo"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<BigCustomerViewEntity>, int)> GetListAsync(int? companyId, long? userId, long? bigCustomerGroupId, int? bigCustomerLevel, string customerName, string provinceCode, string cityCode, string countyCode, string phone, string weChatNo, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        /// <summary>
        /// 添加新大客户纪录
        /// </summary>
        /// <param name="bigCustomerEntity"></param>
        /// <returns></returns>
        Task<BigCustomerEntity> InsertAsync(BigCustomerEntity entity);
        /// <summary>
        /// 修改大客户记录
        /// </summary>
        /// <param name="bigCustomerEntity"></param>
        /// <returns></returns>
        Task<BigCustomerEntity> UpdateAsync(BigCustomerEntity entity);

        /// <summary>
        /// 获取大客户记录
        /// </summary>
        /// <param name="bigCustomerId"></param>
        /// <returns></returns>
        Task<BigCustomerViewEntity> GetBigCustomerViewEntityAsync(long bigCustomerId);
    }
}